/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Telas;

import javax.swing.JFrame;

/**
 *
 * @author AELSON
 */
public class Principal extends javax.swing.JFrame {
    
    public Principal() {
        
         
        
        initComponents();
        
        setLocationRelativeTo(null);
        
    }


    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuItem1 = new javax.swing.JMenuItem();
        jPanel1 = new javax.swing.JPanel();
        jMenuBar1 = new javax.swing.JMenuBar();
        cadastro = new javax.swing.JMenu();
        cadFunci = new javax.swing.JMenuItem();
        prod = new javax.swing.JMenuItem();
        cadFornecedor = new javax.swing.JMenuItem();
        setor = new javax.swing.JMenuItem();
        cadCidade = new javax.swing.JMenuItem();
        cadEstado = new javax.swing.JMenuItem();
        undS = new javax.swing.JMenuItem();
        relatorios = new javax.swing.JMenu();
        jMenuItem7 = new javax.swing.JMenuItem();
        jMenuItem8 = new javax.swing.JMenuItem();
        distribuicao = new javax.swing.JMenu();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        sair = new javax.swing.JMenu();

        jMenuItem1.setText("jMenuItem1");

        jPanel1.setDebugGraphicsOptions(javax.swing.DebugGraphics.NONE_OPTION);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 538, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 279, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("SYSGEST - Sistema de Gestão de Medicamento e Materiais");
        setForeground(new java.awt.Color(255, 255, 255));
        setLocationByPlatform(true);
        setResizable(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        cadastro.setBackground(new java.awt.Color(255, 255, 255));
        cadastro.setText("Cadastro");
        cadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cadastroActionPerformed(evt);
            }
        });

        cadFunci.setText("Funcionários");
        cadFunci.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cadFunciActionPerformed(evt);
            }
        });
        cadastro.add(cadFunci);

        prod.setText("Produtos");
        prod.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                prodActionPerformed(evt);
            }
        });
        cadastro.add(prod);

        cadFornecedor.setText("Fornecedor");
        cadFornecedor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cadFornecedorActionPerformed(evt);
            }
        });
        cadastro.add(cadFornecedor);

        setor.setText("Setor");
        setor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                setorActionPerformed(evt);
            }
        });
        cadastro.add(setor);

        cadCidade.setText("Cidade");
        cadCidade.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cadCidadeActionPerformed(evt);
            }
        });
        cadastro.add(cadCidade);

        cadEstado.setText("Estado");
        cadEstado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cadEstadoActionPerformed(evt);
            }
        });
        cadastro.add(cadEstado);

        undS.setText("Unidade Saúde");
        cadastro.add(undS);

        jMenuBar1.add(cadastro);

        relatorios.setText("Relatorios");

        jMenuItem7.setText("Curva ABC");
        relatorios.add(jMenuItem7);

        jMenuItem8.setText("Mensal");
        relatorios.add(jMenuItem8);

        jMenuBar1.add(relatorios);

        distribuicao.setText("Distribuição");

        jMenuItem3.setText("Entrada");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        distribuicao.add(jMenuItem3);

        jMenuItem2.setText("Saída");
        distribuicao.add(jMenuItem2);

        jMenuBar1.add(distribuicao);

        sair.setText("Sair");
        sair.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        sair.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                sairMouseClicked(evt);
            }
        });
        sair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sairActionPerformed(evt);
            }
        });
        jMenuBar1.add(sair);

        setJMenuBar(jMenuBar1);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void cadFunciActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadFunciActionPerformed
        // TODO add your handling code here:
        TelaFuncionarios t = new TelaFuncionarios();
        t.setVisible(true);

    }//GEN-LAST:event_cadFunciActionPerformed

    private void prodActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_prodActionPerformed
        // TODO add your handling code here:
        TelaProdutos p = new TelaProdutos();
        p.setVisible(true);

    }//GEN-LAST:event_prodActionPerformed

    private void sairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sairActionPerformed
        // TODO add your handling code here:


    }//GEN-LAST:event_sairActionPerformed

    private void sairMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_sairMouseClicked
        // TODO add your handling code here:
        System.exit(0);
    }//GEN-LAST:event_sairMouseClicked

    private void cadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadastroActionPerformed
        // TODO add your handling code here:


    }//GEN-LAST:event_cadastroActionPerformed

    private void cadFornecedorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadFornecedorActionPerformed
        // TODO add your handling code here:
        TelaFornecedor f = new TelaFornecedor();
        f.setVisible(true);

    }//GEN-LAST:event_cadFornecedorActionPerformed

    private void cadCidadeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadCidadeActionPerformed
        // TODO add your handling code here:
        
    }//GEN-LAST:event_cadCidadeActionPerformed

    private void cadEstadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadEstadoActionPerformed
        // TODO add your handling code here:r

        
    }//GEN-LAST:event_cadEstadoActionPerformed

    private void setorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_setorActionPerformed
        // TODO add your handling code here
        TelaSetor s = new TelaSetor();
        s.setVisible(true);
    }//GEN-LAST:event_setorActionPerformed

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
        
       this.setExtendedState(this.MAXIMIZED_BOTH);

    }//GEN-LAST:event_formWindowOpened

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Principal().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem cadCidade;
    private javax.swing.JMenuItem cadEstado;
    private javax.swing.JMenuItem cadFornecedor;
    private javax.swing.JMenuItem cadFunci;
    private javax.swing.JMenu cadastro;
    private javax.swing.JMenu distribuicao;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem7;
    private javax.swing.JMenuItem jMenuItem8;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JMenuItem prod;
    private javax.swing.JMenu relatorios;
    private javax.swing.JMenu sair;
    private javax.swing.JMenuItem setor;
    private javax.swing.JMenuItem undS;
    // End of variables declaration//GEN-END:variables

}
